package pojo;

public class Transaction {
    private String transactionNumber;
    private String partNumber;
    private String transactionType;
    private int quantity;
    private boolean updateStatus;

    public Transaction(String transactionNumber, String partNumber, String transactionType, int quantity, boolean updateStatus) {
        this.transactionNumber = transactionNumber;
        this.partNumber = partNumber;
        this.transactionType = transactionType;
        this.quantity = quantity;
        this.updateStatus = updateStatus;
    }

    // Getters and setters
    public String getTransactionNumber() { return transactionNumber; }
    public void setTransactionNumber(String transactionNumber) { this.transactionNumber = transactionNumber; }

    public String getPartNumber() { return partNumber; }
    public void setPartNumber(String partNumber) { this.partNumber = partNumber; }

    public String getTransactionType() { return transactionType; }
    public void setTransactionType(String transactionType) { this.transactionType = transactionType; }

    public int getQuantity() { return quantity; }
    public void setQuantity(int quantity) { this.quantity = quantity; }

    public boolean isUpdateStatus() { return updateStatus; }
    public void setUpdateStatus(boolean updateStatus) { this.updateStatus = updateStatus; }
    //重写一下ToString方法，前面的描述用中文
    @Override
    public String toString() {
        return "交易编号：" + transactionNumber + ", 零件编号：" + partNumber + ", 交易类型：" + transactionType + ", 数量：" + quantity + ", 更新状态：" + updateStatus;
    }

}